Technology for specifying a position within a surface utilizing a position code set on the surface has been already devised. As such technology, for example, methods for generating and decoding a position code disclosed in Patent Literature 1 are known. Hereinafter, the conventional method disclosed in Patent Literature 1 will be described briefly.
The conventional method disclosed in Patent Literature 1 uses three types of sequences, which are a main number sequence, a primary number sequence, and a secondary number sequence, for generating a position code. In addition, Patent Literature 1 discloses a method of generating a graphical position code, printing the position code on a paper surface, optically detecting the position code with an input section included in an electronic pen, and distinguishing a coordinate position based on the detected position code.
In Patent Literature 1, a sequence that is in binary numbers and whose length is 63 is illustrated as the main number sequence. A sequence generated by linking, to the tail end of the main number sequence, a starting end of the same main number sequence is referred to as a cyclic main number sequence. The cyclic main number sequence in Patent Literature 1 is a sequence in which it is possible to clearly determine the place of any partial sequence whose length is 6 in the cyclic main number sequence, with respect to the main number sequence. Here, the place of a partial sequence with respect to the main number sequence corresponds to a remainder obtained when shift length of the beginning of the partial sequence from the beginning of the main number sequence in a predetermined direction is divided with the length of the main number sequence. Thus, when there is a partial sequence whose length is 6 extracted from a cyclic main number sequence whose main number sequence has a length of 63, the place of the extracted partial sequence can be specified in a range of 0 to 62.
Two or more main number sequences are each moved (shifted) in a predetermined direction depending on a designated cyclic shift amount and serially arranged next to each other to form a cyclic main number sequence. The difference in a cyclic shift amount between two adjacent cyclic main number sequences is referred to as a difference number. This difference number is obtained by extracting, from two adjacently arranged cyclic main number sequences, respective partial sequences whose shift lengths are equal, specifying the places of the two extracted partial sequences with respect to the main number sequences, and calculating the difference of the two specified places. It should be noted that the above described partial sequences whose shift lengths are equal refers to partial sequences whose shift amounts (shift widths) of the beginning of respective cyclic main number sequence from the beginning of respective partial sequence are equal. Furthermore, the partial sequences whose shift lengths are equal are not limited to that defined above as long as a difference number between cyclic main number sequences can be appropriately specified. For example, it is possible to use partial sequences corresponding to each other with a positional relationship within a two-dimensional plane by position codes arranged in the two-dimensional plane, or use partial sequences corresponding to each other with a positional relationship within a three dimensional space by position codes arranged in the three dimensional space. In Patent Literature 1, usage of a value from 5 to 58 as the difference number is illustrated. A sequence whose terms are difference numbers is a primary number sequence.
The difference number is broken down into multiple digits based on a mixed base number (mixed radix number). A sequence whose terms are values of each of the digits is defined as a secondary number sequence. Illustrated in Patent Literature 1 as the mixed base number are, sequentially from a base number having a low order, 3, 3, 2, and 3. Thus, the number of secondary number sequences derived from a single primary number sequence is four. The four secondary number sequences are each formed from the cyclic main number sequence, and the length of the main number sequence that is the basis for forming each of the cyclic main number sequences are configured to be a prime with respect to each other (not having a common divisor other than 1). The respective lengths illustrated in Patent Literature 1 for the main number sequences that are the basis for forming the cyclic main number sequences with four secondary number sequences are 236, 233, 31, and 241.
With regard to the four secondary number sequences, a place in each of the secondary number sequences can be specified by acquiring a partial sequence having a length of 5 from each of the secondary number sequences. The place in a secondary number sequence shows desired positional information.
An arrangement of multiple cyclic main number sequences described above is referred to as a position code, and the position code is generated through encoding of the positional information. In addition, positional information can be estimated from a position code of a predetermined range acquired from detecting etc. This is referred to as decoding of the position code.
Furthermore, in the conventional method disclosed in Patent Literature 1, regarding a case where positional information is estimated in a two-dimensional plane, a partial sequence having a length longer than the length of a partial sequence required for estimating the positional information is acquired in order to remove the effect of uncertainty in a detected partial sequence when the position code is rotated (hereinafter, referred to as uncertainty due to rotation). For example, in the above described example of estimating the positional information from a partial sequence having a length of 6, a partial sequence having a length of 8 is acquired in order to remove uncertainty due to rotation.